package edu.hrbu.kwaidu.config;

import edu.hrbu.kwaidu.interceptor.LoginInterceptor;
import edu.hrbu.kwaidu.util.RedisUtil;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @author xudengyu
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    @Resource
    private RedisUtil redisUtil;

    // 注册拦截器，以及设置白名单
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new LoginInterceptor(redisUtil))
//                .excludePathPatterns("/system/index/login","/system/index/info")
        ;
    }
}
